<div class="box white_bg">

<link href="http://<?=SITE_URL?>/public/library/jquery/uploadify/uploadify.css" rel="stylesheet" type="text/css" />


<!-- <script type="text/javascript" src="http://demos.lo/jquery-1.3.2.min.js"></script>
 -->
<script type="text/javascript" src="http://hvn/public/library/jquery/uploadify/swfobject.js"></script>
<script type="text/javascript" src="http://hvn/public/library/jquery/uploadify/jquery.uploadify.js"></script>

<script type="text/javascript">
$(document).ready(function() {
	
	$("#fileInput").uploadify({
		'uploader'       : 'http://<?=SITE_URL?>/public/library/jquery/uploadify/uploadify.swf',
		'script'         : "<?=$this->hvnUrl( array('module' => 'gallery', 'action' => 'process-uploaded-file', 'controller' => "ajax"), 'generic')?>",
		'cancelImg'      : 'http://<?=SITE_URL?>/public/library/jquery/uploadify/cancel.png',
		'folder'         : <?=$this->viewParams['gallery']['id'] ?>, 
		'multi'          : true,
		'onAllComplete' 	 : function(){alert("Refresh to update the thumbnails");} 
	});
//
//	var update_gallery_thumbs = function()
//	{
//		
//	}
});
 //$(window).unload(function() {alert('unloading')});
</script>
	<div style="margin-left:50px;margin-top:30px">
		<b>Gallery name :</b> <img src="<?=str_replace("/original/", "/xxsmall/",$this->viewParams['gallery']['thumb']);?>"
			alt="Thumb" />
		<i><?=$this->viewParams['gallery']['title'] ?> </i> 
		<b>Category :</b>  <?=$this->viewParams['gallery']['category'] ?>)
		<br/>
		<b>Posted by :</b> <a href="<?=$this->hvnUrl(array("module"=>"user",
						"controller" => "account", "action" => "view"
				), 'generic')?>?id=<?=$this->viewParams['gallery']['poster_id'] ?>">
		<?=$this->viewParams['gallery']['metadata']['poster_name'] ?></a>
		<br/><br/>
		<hr/>
		<b>Click Browse to upload Multiple Files</b><br/><br/>
		<input id="fileInput" name="fileInput" type="file" />
		<br/>
		<a href="javascript:$('#fileInput').uploadifyUpload();">Send Selected Files</a>
		| <a href="javascript:$('#fileInput').uploadifyClearQueue();">Clear Queue</a>
	</div>
</div>	